import datetime
from openpyxl import Workbook

wb = Workbook()
ws = wb.active
# set date using a Python datetime
# 设置时间
ws['A1'] = datetime.datetime(2010, 7, 21)

# 获取单元格的数字格式
format = ws['A1'].number_format
print(format)
